package HP.Demo;

import java.util.Scanner;

public class CaiDanShuRu {
    public static void main(String[] args) {
        System.out.println("1.登录 2.注册 3.存款 4.取款");
        boolean xh = true;
        while (xh){
            try{
                Scanner scanner = new Scanner(System.in);
                System.out.println("请选择:");
                int num = scanner.nextInt();
                switch (num){
                    case 1:
                        System.out.println("当前位置->登录");
                        xh = false;
                        break;
                    case 2:
                        System.out.println("当前位置->注册");
                        xh = false;
                        break;
                    case 3:
                        System.out.println("当前位置->存款");
                        xh = false;
                        break;
                    case 4:
                        System.out.println("当前位置->取款");
                        xh = false;
                        break;
                    default:
                        System.out.println("输入有误!");
                }

            }catch (Exception e){
                System.out.println("输入有误!");
            }
        }
        System.out.println("欢迎进入......!");
    }
}
